import 'dart:convert';
import 'dart:ffi';

import 'package:buy_flutter/net/net_manager.dart';
import 'package:buy_flutter/page/login/model/user.dart';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';

class NetUtils {
  static const String net_login_path_login = '/accounts/login';

  static Future<User> loginIn(
      {@required String acccount, @required String password}) async {
    Map<String, dynamic> queryMap = {
      'mobi': '18648957777',
      'password': 'cn5123456',
    };
    // Response<String> response =
    //     await NetManager.post(net_login_path_login, data: jsonEncode(queryMap));
    //
    // User user = User.fromJson(json.decode(response.data));
    //
    // print("response=登录成功======>" + user.code.toString());
    //
    // if (user != null && user.code == 1) {
    //   print("response=登录成功======>");
    // } else {
    //   print("response=登录失败======>");
    // }

    return User();
  }
}
